<template>
  <div>
    <DetailPage
      v-bind="noRecordpart"
      :model="OtherMod"
      style="width: 98%; margin: 0 auto">
      
      <template v-slot:dpSenileProductsPOList="{ row }">
        <ApldTable
          :columns="row.column"
          :data="dpSenileProductsList"></ApldTable>
      </template>
   
      <template v-slot:dpFacilityEquipmentPOList="{ row }">
        <ApldTable
          :columns="row.column"
          :data="dpFacilityEquipmentList"></ApldTable>
      </template>
      <!-- <template v-slot:dpOperateRecordPOList="{ row }">
        <ApldTable
          :columns="row.column"
          :data="rowData.dpOperateRecordList"></ApldTable>
      </template> -->
    </DetailPage>
  </div>
</template>

<script setup lang="ts">
import DetailPage from '@/views/aplid/DetailPage/index.vue'
import { noRecordpart } from '@/views/datacenter/basicData/serviceFacility/config'
import { ApldTable } from '@/components/AplidCrud'

type Props = {
	nowRowData?: any,
	chainViewInfo?:any,
	isBlockchain?:boolean
}
const props = withDefaults(defineProps<Props>(), {
	nowRowData: {},
	chainViewInfo:{},
	isBlockchain:false
})
const rowData: any = inject('nowRowData')

let OtherMod:any = ref({})
let dpSenileProductsList:any = ref([])
let dpFacilityEquipmentList:any = ref([])
if(props.isBlockchain){
  OtherMod.value = props.chainViewInfo
  dpSenileProductsList.value = props.chainViewInfo.bcSenileProducts?JSON.parse(props.chainViewInfo.bcSenileProducts):[]
  dpFacilityEquipmentList.value =props.chainViewInfo.bcFacilityEquipment?JSON.parse(props.chainViewInfo.bcFacilityEquipment):[]
}else{
  if(rowData.value){
   OtherMod.value = rowData.value.dpServiceFacilityOther || {}
   dpSenileProductsList.value = rowData.value.dpSenileProductsList || {}
   dpFacilityEquipmentList.value = rowData.value.dpFacilityEquipmentList || {}
}
}


</script>

<style scoped></style>
